package com.lovejes.cuniao.domain.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the cn_useraccount table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="cn_useraccount"
 */

public abstract class BaseCnUseraccount  implements Serializable {

	public static String REF = "CnUseraccount";
	public static String PROP_STATUS = "Status";
	public static String PROP_USERID = "Userid";
	public static String PROP_INTEGRAL = "Integral";
	public static String PROP_FLAG = "Flag";
	public static String PROP_MONEY = "Money";
	public static String PROP_DEALID = "Dealid";
	public static String PROP_TYPE = "Type";
	public static String PROP_ID = "Id";
	public static String PROP_REMARK = "Remark";
	public static String PROP_BALANCE = "Balance";
	public static String PROP_CREATETIME = "Createtime";


	// constructors
	public BaseCnUseraccount () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseCnUseraccount (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.String userid;
	private java.lang.String dealid;
	private java.math.BigDecimal money;
	private java.util.Date createtime;
	private java.lang.String remark;
	private java.lang.String flag;
	private java.lang.String type;
	private java.math.BigDecimal balance;
	private java.lang.Integer integral;
	private java.lang.String status;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="native"
     *  column="ID"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: USERID
	 */
	public java.lang.String getUserid () {
		return userid;
	}

	/**
	 * Set the value related to the column: USERID
	 * @param userid the USERID value
	 */
	public void setUserid (java.lang.String userid) {
		this.userid = userid;
	}



	/**
	 * Return the value associated with the column: DEALID
	 */
	public java.lang.String getDealid () {
		return dealid;
	}

	/**
	 * Set the value related to the column: DEALID
	 * @param dealid the DEALID value
	 */
	public void setDealid (java.lang.String dealid) {
		this.dealid = dealid;
	}



	/**
	 * Return the value associated with the column: MONEY
	 */
	public java.math.BigDecimal getMoney () {
		return money;
	}

	/**
	 * Set the value related to the column: MONEY
	 * @param money the MONEY value
	 */
	public void setMoney (java.math.BigDecimal money) {
		this.money = money;
	}



	/**
	 * Return the value associated with the column: CREATETIME
	 */
	public java.util.Date getCreatetime () {
		return createtime;
	}

	/**
	 * Set the value related to the column: CREATETIME
	 * @param createtime the CREATETIME value
	 */
	public void setCreatetime (java.util.Date createtime) {
		this.createtime = createtime;
	}



	/**
	 * Return the value associated with the column: REMARK
	 */
	public java.lang.String getRemark () {
		return remark;
	}

	/**
	 * Set the value related to the column: REMARK
	 * @param remark the REMARK value
	 */
	public void setRemark (java.lang.String remark) {
		this.remark = remark;
	}



	/**
	 * Return the value associated with the column: FLAG
	 */
	public java.lang.String getFlag () {
		return flag;
	}

	/**
	 * Set the value related to the column: FLAG
	 * @param flag the FLAG value
	 */
	public void setFlag (java.lang.String flag) {
		this.flag = flag;
	}



	/**
	 * Return the value associated with the column: TYPE
	 */
	public java.lang.String getType () {
		return type;
	}

	/**
	 * Set the value related to the column: TYPE
	 * @param type the TYPE value
	 */
	public void setType (java.lang.String type) {
		this.type = type;
	}



	/**
	 * Return the value associated with the column: BALANCE
	 */
	public java.math.BigDecimal getBalance () {
		return balance;
	}

	/**
	 * Set the value related to the column: BALANCE
	 * @param balance the BALANCE value
	 */
	public void setBalance (java.math.BigDecimal balance) {
		this.balance = balance;
	}



	/**
	 * Return the value associated with the column: INTEGRAL
	 */
	public java.lang.Integer getIntegral () {
		return integral;
	}

	/**
	 * Set the value related to the column: INTEGRAL
	 * @param integral the INTEGRAL value
	 */
	public void setIntegral (java.lang.Integer integral) {
		this.integral = integral;
	}



	/**
	 * Return the value associated with the column: STATUS
	 */
	public java.lang.String getStatus () {
		return status;
	}

	/**
	 * Set the value related to the column: STATUS
	 * @param status the STATUS value
	 */
	public void setStatus (java.lang.String status) {
		this.status = status;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.lovejes.cuniao.domain.CnUseraccount)) return false;
		else {
			com.lovejes.cuniao.domain.CnUseraccount cnUseraccount = (com.lovejes.cuniao.domain.CnUseraccount) obj;
			if (null == this.getId() || null == cnUseraccount.getId()) return false;
			else return (this.getId().equals(cnUseraccount.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}